home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr46 / be310.zip / LEAP.CHS < prev    next >
Text File  |  1993-06-01  |  1KB  |  29 lines

  1. /* CHESS FUNCTION(S): leap_forward, leap_backward
  2. /*              DATE: 3/1/93
  3. /*            AUTHOR: C. Schanck
  4. /*
  5. /*       DESCRIPTION: these two functions mimic the functionality of 
  6. /* the 'leap_' functions which were dropped after version 3.00 (They
  7. /* were replaced by the 'isearch' function.  They simply find the
  8. /* next occurance of a specified character, the current char
  9. /* included.
  10. leap_forward{        /* leap forward
  11.    int i;         
  12.    char buf[2];
  13.    msg("Leap forward to what char?");     /* prompt for character 
  14.    buf[0]=getkey()%256;                   /* get the char         
  15.    buf[1]=0;                              /* terminate the string 
  16.    
  17.    /* now search for the target, with case sensitivity off!
  18.    return(b_cmd("search",str(buf),key("return"),str(""),key("return")));
  19. }
  20. leap_backward{     
  21.    int i;         
  22.    char buf[2];
  23.    msg("Leap back to what char?");        /* prompt for character 
  24.    buf[0]=getkey()%256;                   /* get the char         
  25.    buf[1]=0;                              /* terminate the string 
  26.  
  27.    /* now search for the target, with case sensitivity off! backwards...
  28.    return(b_cmd("search",str(buf),key("return"),str("b"),key("return")));
  29. }